package com.own.component.log.operation.core.impl;

import com.alibaba.fastjson2.JSON;
import com.own.component.log.operation.core.PersistenceLogOperationHook;
import com.own.component.log.operation.entity.LogOperationEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Component;

/**
 * PersistenceLogOperationHookNoneImpl
 *
 * @author chenxueli
 * @date 2024-03-13 08:56:00
 */
@Slf4j
@Component
@ConditionalOnMissingBean(name = "persistenceLogOperationHook")
public class PersistenceLogOperationHookNoneImpl implements PersistenceLogOperationHook {

    /**
     * 获取对应的日志操作接口
     *
     * @param entity 对象信息
     */
    @Override
    public void run(LogOperationEntity entity) {
        log.info(JSON.toJSONString(entity));
    }

}
